<?php

/**
 * Class Involved_NewsCategoryModel
 */
class Involved_NewsCategoryModel extends BaseModel
{

    protected $table = 'news_category';

    /**
     * 文章分类查询
     * @return mixed
     */
    public function Category()
    {
        return DB::table($this->table)
            ->where('status',1)
            ->orderBy('news_category.add_time','desc')
            ->get();
    }

    /**
     * 文章分类列表
     * @return mixed
     */
    public function NewsCateList()
    {
        return DB::table($this->table)
            ->orderBy('news_category.add_time', 'desc')
            ->get();
    }

    /**
     * 修改获取信息
     * @param $auto_id
     * @return mixed
     */
    public function GetNewsCateId($auto_id)
    {
        return DB::table($this->table)
            ->select()
            ->where('auto_id',$auto_id)
            ->first();
    }
}
